Skip to content

Merge upstream 5.0.6 - #3

Open
MajdSehwail wants to merge 154 commits into
masterfrom
merge-upstream-5.0.6
Open

Merge upstream 5.0.6#3
MajdSehwail wants to merge 154 commits into
masterfrom
merge-upstream-5.0.6

Conversation

@MajdSehwail

Copy link
Copy Markdown
Member

Our fork is based on v3.0.5 (2022). Upstream is now at v5.0.6. Upstream contains equivalent fixes for most of our patches, including the traverse_errors fixes for nested embeds and assocs. A small diff against upstream makes future upstream merges cheap.

  • Merge mathieuprog/polymorphic_embed v5.0.6 (master) into our fork.
  • Resolve all conflicts in favor of upstream.
  • Keep two fork-specific changes on top, as separate commits:
    • A traverse_errors/4 hook. Other parameterized types can add their errors to traversal.
    • A guard for wrong-shaped cast params. Invalid shapes produce an "is invalid". changeset error instead of an exception.

bashar-qassis and others added 30 commits October 20, 2021 14:16
mathieuprog and others added 30 commits February 18, 2025 13:20
relax phoenix_live_view version constraint
…n-warning

Remove warning when aliases cannot be expanded
Update Elixir requirement to 1.13+
types

When using `use_parent_field_for_type` option in `polymorphic_embeds_one`,
the `action_and_struct/4` function's cond block was missing a clause to
handle the case when both `type_from_parent_field` and `type_from_map`
are present and match.

The existing cond only handled:
1. type_from_parent_field is nil -> :type_not_found
2. type_from_map is nil -> get module and return action/struct
3. types don't match -> raise error

This caused a CondClauseError when form params included the `__type__`
field matching the parent field type (e.g., during form validation).

Added a `true` clause to handle the matching types case, which behaves
the same as when type_from_map is nil - it uses the parent field type
to determine the module and returns the appropriate action/struct tuple.
Fix CondClauseError when using use_parent_field_for_type with matching types
…deprecation

Fix preferred cli env deprecation and update credo to support elixir v1.19
- Resolve all conflicts in favor of upstream.
- Upstream v4+ includes equivalent fixes for this fork's traverse_errors changes.
- traverse_errors/2 collects errors from any parameterized type that defines traverse_errors/4.
- This is a fork-specific change with no upstream equivalent.
- cast_polymorphic_embed adds an "is invalid" changeset error for params with an invalid shape, instead of raising.
- This is a fork-specific change with no upstream equivalent.
- Update phoenix, plug, and postgrex to versions without known advisories.
- Ignore the decimal advisory CVE-2026-32686. The fix exists only in
  decimal 3.x, and ecto 3.12 requires decimal 2.x. The exposure is
  test-only for this library.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.